package com.zjj.learn.designmodel.work.visitor;

/**
 * 具体访问元素，圆
 **/
public class Circle implements Element {

    /**
     * 确定圆的因素，原点坐标和半径
     **/
    private int x, y, radius;

    public Circle(int x, int y, int radius) {
        this.x = x;
        this.y = y;
        this.radius = radius;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getRadius() {
        return radius;
    }

    /**
     * 将圆指派给某个访问者对象
     **/
    @Override
    public void accept(Visitor visitor) {
        visitor.visitCircle(this);
    }
}
